package aeolus.wind.spider.biz.dataobject;

import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
import com.sleepycat.persist.model.Relationship;
import com.sleepycat.persist.model.SecondaryKey;

/**
 * 以人为本。每个人都可以拥有自己的小组。每个人又都会归属某一特定的小组并由人领导。这里的组名只是一个代号，人名才是唯一的标志属性。
 * 
 * @author aeoluswind
 */
@Entity
public class Identity {

    @PrimaryKey
    private String  name;
    private String  passwd;
    private String  groupName;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String  leaderName;
    private boolean isAbleToLeadGroup;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getLeaderName() {
        return leaderName;
    }

    public void setLeaderName(String leaderName) {
        this.leaderName = leaderName;
    }

    public boolean isAbleToLeadGroup() {
        return isAbleToLeadGroup;
    }

    public void setAbleToLeadGroup(boolean isAbleToLeadGroup) {
        this.isAbleToLeadGroup = isAbleToLeadGroup;
    }

}
